import request from "@/utils/request";

// 分页角色查询
export function listPageRoles(data) {
  return request({
    url: "/role/pages",
    method: "get",
    params: data,
  });
}

// 角色列表查询
export function listRoles(data) {
  return request({
    url: "/role/list",
    method: "get",
    params: data,
  });
}

// 新增角色
export function insertRole(data) {
  return request({
    url: "/role",
    method: "post",
    data,
  });
}

// 编辑角色
export function updateRole(data) {
  return request({
    url: "/role",
    method: "put",
    data,
  });
}

// 批量删除角色
export function deleteRoles(data) {
  return request({
    url: "/role",
    method: "delete",
    params: data,
  });
}

// 删除角色
export function deleteRole(data) {
  return request({
    url: "/role/" + data,
    method: "delete",
  });
}
